<!--
  @author yangjiangming
  @date 2018-12-10 20:40:28
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html th:replace="~{work/modify/common/layout :: layout('完成', ~{::title}, ~{::content}, ~{::script})}"
      xmlns:th="http://www.springframework.org/schema/mvc">
<head>
    <title>工单管理-完成</title>
</head>
<body>

<div th:fragment="content">

    <style>
        .d-bg-ali, .d-bg-wechat, .d-bg-bank {
            display: inline-block;
            vertical-align: middle;
            margin-right: 5px;
            margin-bottom: 8px;
            width: 20px;
            height: 20px;
            background: url("/static/images/pay_icon_sprites.png") no-repeat left center;
        }

        .d-bg-wechat {
            background: url("/static/images/pay_icon_sprites.png") no-repeat -20px center;
        }

        .d-bg-bank {
            background: url("/static/images/pay_icon_sprites.png") no-repeat -40px center;
        }
    </style>
    <form action="/work/modify/save/complete" method="post" class="layui-form">
        <input type="hidden" id="casSign" name="casSign" th:value="${casSign}"/>
        <input type="hidden" name="orderId" th:value="${orderWork.orderId}">
        <input type="hidden" name="workId" th:value="${orderWork.workId}">
        <input type="hidden" name="bizType" th:value="${orderWork.bizType}">
        <input type="hidden" name="channelId" th:value="${orderWork.channelId}">
        <input type="hidden" name="payType" value="11">

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">订单金额</label>
                <div class="layui-input-inline" style="width: auto">
                    <span class="layui-btn layui-btn-disabled " id="originalAmount">00.00</span>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">订单收入</label>
                <div class="layui-input-inline" style="width: auto">
                    <span class="layui-btn layui-btn-disabled " id="totalAmount">00.00</span>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">工程师收款金额</label>
                <div class="layui-input-inline" style="width: auto">
                    <span class="layui-btn layui-btn-disabled " id="masterAmount">00.00</span>
                </div>
            </div>
        </div>
        <div th:if="${showPay == 2}">
            <!--保外订单-->
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">支付方式</label>
                    <!--支付宝支付-->
                    <div th:if="${showAlipayAndWeixinpay == 2}" class="layui-input-inline" style="width: auto">
                        <div class="layui-btn layui-btn-primary" id="payment_method_alipay">
                            <i class="layui-icon d-bg-ali"></i>
                            <span>支付宝</span>
                        </div>
                    </div>
                    <!--微信支付-->
                    <div th:if="${showAlipayAndWeixinpay == 2}" class="layui-input-inline" style="width: auto">
                        <div class="layui-btn layui-btn-primary" id="payment_method_wechat">
                            <i class="layui-icon d-bg-wechat"></i>
                            <span>微信</span>
                        </div>
                    </div>
                    <!--银行转账-->
                    <div th:if="${showBanktransferPay == 2}" class="layui-input-inline" style="width: auto">
                        <div class="layui-btn layui-btn-primary" id="payment_method_bank">
                            <i class="layui-icon d-bg-bank"></i>
                            <span>银行转账</span>
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <div style="display: none" id="bankTransferFragment">
            <input type="hidden" name="payChannelId" value="5">
            <input type="hidden" name="operatorId" th:value="${operatorId}">
            <input type="hidden" th:if="${bankAccountList != null && bankAccountList.size() > 0}"
                   id="companyName" name="companyName" th:value="${bankAccountList[0].companyName}" required lay-verify="non-empty" autocomplete="off">
            <div class="layui-form-item">
                <label class="layui-form-label ">到账银行</label>
                <div class="layui-input-inline" style="width:332px;">
                    <input th:if="${bankAccountList != null && bankAccountList.size() > 0}" id="toBank" type="text" required lay-verify="non-empty"
                           class="layui-input layui-disabled" readonly name="toBank"
                           th:value="${bankAccountList[0].bankName}" autocomplete="off">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline d-marginright0">
                    <label class="layui-form-label d-label">转账账号</label>
                    <div class="layui-input-inline d-marginright0" style="width:332px;">
                        <select th:if="${bankAccountList != null}" class="seloption" required lay-verify="non-empty"
                                name="transferCode" id="transferCode" lay-filter="transferCode">
                            <option th:each="bank : ${bankAccountList}"
                                    data-th-data-name="${bank.bankName}"
                                    data-th-data-value="${bank.companyName}"
                                    th:value="${bank.bankAccount}"
                                    th:text="${bank.bankAccount}">
                            </option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline ">
                    <label class="layui-form-label ">转账人</label>
                    <div class="layui-input-inline ">
                        <input type="text" required lay-verify="non-empty" class="layui-input" name="transferor"
                               autocomplete="off">
                    </div>
                </div>
                <div class="layui-inline ">
                    <label class="layui-form-label ">转账时间</label>
                    <div class="layui-input-inline ">
                        <input type="text" required lay-verify="required|non-empty" class="layui-input"
                               name="transferTime" id="transferTime" autocomplete="off">
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">上传凭证<span style="color: red">*</span></label>
                        <div class="layui-upload-drag" id="certificateImgSrc">
                            <img src="" style="display: none">
                            <input type="hidden" id="certificateImgSrcValue" name="certificateImgSrc">
                            <i class="layui-icon"></i>
                            <p>点击上传</p>
                        </div>
                        <div class="layui-inline">
                            <i class="layui-icon layui-icon-search btn-review"></i><br>
                            <i class="layui-icon layui-icon-delete btn-delete"></i>
                        </div>
                        <div class="layui-upload-drag" id="certificateImgSrc2">
                            <img src="" style="display: none">
                            <input type="hidden" id="certificateImgSrc2Value" name="certificateImgSrc2">
                            <i class="layui-icon"></i>
                            <p>点击上传</p>
                        </div>
                        <div class="layui-inline">
                            <i class="layui-icon layui-icon-search btn-review"></i><br>
                            <i class="layui-icon layui-icon-delete btn-delete"></i>
                        </div>
                        <div class="layui-upload-drag" id="certificateImgSrc3">
                            <img src="" style="display: none">
                            <input type="hidden" id="certificateImgSrc3Value" name="certificateImgSrc3">
                            <i class="layui-icon"></i>
                            <p>点击上传</p>
                        </div>
                        <div class="layui-inline">
                            <i class="layui-icon layui-icon-search btn-review"></i><br>
                            <i class="layui-icon layui-icon-delete btn-delete"></i>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item"><label class="layui-form-label"></label><span
                        style="font-size: 2px;color: rgb(255,0,0)">单张图片大小5M以内，支持jpg、jpeg、png格式图片上传</span></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label "></label>
                <div class="layui-inline ">
                    <button class="layui-btn layui-btn-lg layui-bg-green" lay-submit="" lay-filter="save">保存</button>
                    <!--<button class="layui-btn layui-btn-lg layui-btn-primary" type="reset">重置</button>-->
                </div>
                <!--
                <div class="layui-inline ">
                    完成后，请电话告知用户领取保修卡
                </div>
                -->
            </div>
        </div>

        <div th:unless="${showPay == 2}">
            <div class="layui-inline">
                <label class="layui-form-label"></label>
                <div class="layui-input-inline" style="width: auto">
                    <div class="layui-btn layui-btn-primary" id="payment_method_complete">
                        <span>保存</span>
                    </div>
                </div>
            </div>
        </div>
    </form>

</div>

<script th:inline="javascript">
	var orderWork = [[${orderWork}]]
	var layuiModel = {
		oms_work_modify_complete: 'work/modify/zmn.oms.work.modify.complete'
	}
</script>
</body>
</html>
